define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {
		
		//返回信息
		return {
			edit: function(id,type,value,name,callback) {
				var updateParams = new Object();
				updateParams.id = id;
				updateParams.type = type;
				updateParams.value = value;
				updateParams.name = name;
				updateParams = JSON.stringify(updateParams);
				Http.post({
					method: 'member.cusphone.update',
					updateParams:updateParams
				}, function(result) {
					//函数回调
					if(callback)
						callback(result);
				}, function(e) {

				}, function() {

				});
			},
			detail:function(id,callback){
				Http.post({
					method:'member.cusphone.detail',
					id:id
				},function(result){
					if(callback){
						callback(result.result);
					}
				},function(e){
					
				})
			},
			sotremember:function(callback){
				Http.post({
					method:'member.cusphone.getstoremember'
				},function(result){
					if(callback){
						callback(result.result);
					}
				},function(e){
					
				})
			}
			
			
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("CustomqqAdd", factory);
});